﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using weclever.Navigation;

namespace weclever
{
    /*
    public interface IWebConnectionFactory
    {
        IPageCommunication GetNewWebClient();
        IPageCommunication GetWebClient();
    }

     */ 
    public static class WebConnectionFactory //: IWebConnectionFactory
    {
        static IPageCommunication _pageCommunication = null;

        public static IPageCommunication GetNewWebClient()
        {
            return new WebClientNavigation();
        }

        public static IPageCommunication WebClient
        {
            get
            {
                if (_pageCommunication == null)
                {
                    _pageCommunication = GetNewWebClient();
                }
                return _pageCommunication;
            }
        }
    }
}
